<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
   <title>培训人数统计</title>
<script>
	function yz(){
	    //var bmbh=document.getElementById("bm").value;
		var startDate=document.getElementById("startDate").value;
		var endDate=document.getElementById("endDate").value;
		
		if(startDate==""||endDate=="")
		{
		alert("请输入时间");
		return false;
		}
		
	}
</script>
    <script>
function openwindow(str)
{
  window.open("doTree.jsp?sid="+str+"&pd=","部门","height=380,width=260,top=230,left=450,scrollbars=yes"); 
   //showModalDialog("doTree.jsp","部门","height=380,width=260,top=230,left=250,scrollbars=yes");
}
</script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body onload="loaddw();selectedaddr()">
  <%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh");  
   if((dlyh.getZd().getTypename().endsWith("乡")||dlyh.getZd().getTypename().equals("工业园区")||dlyh.getZd().getTypename().endsWith("镇")||dlyh.getZd().getTypename().endsWith("办")||dlyh.getZd().getTypename().endsWith("办事处")||dlyh.getZd().getTypename().endsWith("局")||dlyh.getZd().getTypename().endsWith("社")||dlyh.getZd().getTypename().endsWith("集团")||dlyh.getZd().getTypename().endsWith("院")||dlyh.getZd().getTypename().equals("民航"))){
   %>
  <input type="hidden" value="<%=request.getSession().getAttribute("shiqyid") %>" id="shiqyid" name="shiqyid" />
  <%}%>
  <input type="hidden" value="<%=dlyh.getZd().getParentid() %>" id="qyid" name="qyid" />
  <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type="hidden" value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
  <script language="javascript" type="text/javascript" src="js/qy1.js"></script>
  <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
    <form id="form1" name="form1" method="post" action="kptj.do" onsubmit="return yz();">
    <input type="hidden" value="<%=request.getParameter("sname") %>" name="sname" id="sname"  >
<input type="hidden" value="" name="falg" id="falg"/>
  &nbsp;选择时间：&nbsp;&nbsp;
  <input type="text" name="startDate" id="startDate"  class="SmallInput" onFocus="WdatePicker()" />
至
 <input type="text" name="endDate" id="endDate"  class="SmallInput" onFocus="WdatePicker()" />
  <br>
  <%if((dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))||dlyh.getZd().getTypename().equals("河北省")) {%>
    <div style="display: none">
  请选择部门：&nbsp;<!-- <input type="text" name="bm" id="bm"  class="SmallInput" onClick="openwindow(1)"  disabled="disabled" />
    <a href="javascript:openwindow(1);">选择</a><br/>
   <input type="hidden" id ="bmbh" name="bmbh"  /> -->
   
   <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>市
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村<br />
</div>
  <%} else{%>请选择单位：
   <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>市
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村<br />
  <%} %>
 <input type="submit" name="button" id="button" value="查看统计表"  onclick="document.getElementById('falg').value='';"/>
 <input type="submit" name="button2" id="button2" value="查看统计图"  onclick="document.getElementById('falg').value=1;"/>
</form>
  </body>
</html>
